<%@ Page Language="C#" MasterPageFile="~/GUI/Webpage/Admin/MasterAdmin.master" AutoEventWireup="true" CodeFile="FoodManagement.aspx.cs" Inherits="GUI_Webpage_Food" Title="FOOD MANAGEMENT" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table class="tdHolder" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <table  border="0" cellpadding="0" cellspacing="0">
                                <tr> 
                                    <td colspan="2">
                                        <img src="../../../GUI/Image/WebsiteTemplate/30-4/Title_Food.jpg" alt="Food management" /></td>
                                </tr>
                                
                                <tr>
                                    <td>
                                        <table class="TableOrderContent" cellpadding="5"; cellspacing="5">
                                             <tr>
                                                <td class="tdTextContent">
                                                    <table cellpadding="2" cellspacing="2"> 
                                                        <tr>
                                                            <td>
                                                                FoodID&nbsp;</td>
                                                            <td>
                                                                &nbsp;<asp:TextBox ID="txtFoodID" runat="server" ></asp:TextBox></td>
                                                            <td>
                                                                <asp:RequiredFieldValidator ID="rfvFoodID" 
                                                                runat="server" ControlToValidate="txtFoodID"
                                                                    ErrorMessage="FoodID is required">
                                                                </asp:RequiredFieldValidator>
                                                            </td>
                                                            <td>
                                                                 Price:</td>                                                        
                                                            <td >
                                                                <asp:TextBox ID="txtPrice" runat="server"></asp:TextBox></td>
                                                           
                                                        </tr>
                                                        <tr>
                                                            <td >
                                                                Food name:
                                                            </td>
                                                            <td>
                                                                &nbsp;<asp:TextBox ID="txtFoodName" runat="server"></asp:TextBox></td>
                                                            <td rowspan="2">
                                                                <asp:RequiredFieldValidator ID="rfvFoodName" 
                                                                runat="server" ControlToValidate="txtFoodName"
                                                                    ErrorMessage="Food name is required">
                                                                </asp:RequiredFieldValidator>
                                                            </td>
                                                            <td rowspan="2">
                                                                Picture:&nbsp;</td>
                                                                <td rowspan="2">
                                                                    &nbsp;
                                                                    <asp:FileUpload ID="fileFood" runat="server" /></td>
                                                        </tr>                                                                                                                                                                           
                                                        <tr>
                                                            <td>
                                                                Type of food:
                                                            </td>
                                                            <td>
                                                               &nbsp;<asp:DropDownList ID="drpTypeFood" runat="server" CssClass="controlText">
                                                            </asp:DropDownList></td>
                                                         </tr>
                                                         <tr>   
                                                             <td>
                                                                 Number of Person:</td>
                                                             <td>
                                                                <asp:TextBox ID="txtNumberPerson" runat="server"></asp:TextBox></td> 
                                                             <td class="tdButton" colspan="1">
                                                             </td>
                                                             <td class="tdButton" colspan="1">
                                                                Description:</td>
                                                             <td class="tdButton" colspan="3">
                                                                <asp:TextBox ID="txtDescription" runat="server" 
                                                                CellPadding="10" TextMode="MultiLine"></asp:TextBox>&nbsp;</td>                                                               
                                                        </tr>                                                  
                                                        <tr>
                                                            <td>
                                                            </td>
                                                            <td>
                                                            </td>
                                                            <td class="tdButton" colspan="1">
                                                            </td>
                                                            <td class="tdButton" colspan="3">
                                                                <asp:Button ID="btnCreate" runat="server" class="button" Text="Create" OnClick="btnCreate_Click" /></td>
                                                        </tr>
                                                    </table>
                                              
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                <table cellpadding="5" cellspacing="">
                                                    <tr>
                                                        <td colspan="5">
                                                            <strong>
                                                                <i>
                                                                    List of all food
                                                                </i>
                                                            </strong>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:GridView ID="grvFood" runat="server" AutoGenerateColumns="False" 
                                                            OnRowEditing="grvFood_RowEditing" DataKeyNames="FoodID" 
                                                            OnRowCancelingEdit="grvFood_RowCancelingEdit" OnRowDeleting="grvFood_RowDeleting" 
                                                            OnRowUpdating="grvFood_RowUpdating" CellPadding="5">
                                                                <Columns>
                                                                    <asp:BoundField DataField="foodID" HeaderText="FoodID" />
                                                                    <asp:BoundField DataField="foodName" HeaderText="Food Name" />
                                                                    <asp:BoundField DataField="typeName" HeaderText="Type" />
                                                                    <asp:BoundField DataField="numberOfPerson" HeaderText="Number Person" />
                                                                    <asp:BoundField DataField="price" HeaderText="Price" />
                                                                    <asp:BoundField DataField="foodDescription" HeaderText="Description" />
                                                                    <asp:CommandField ShowEditButton="True" />
                                                                    <asp:CommandField ShowDeleteButton="True" />
                                                                </Columns>
                                                            </asp:GridView>
                                                        </td>
                                                </tr>  
                                                                                                                                                                                   
                                            </table>
                                        </td>
                                    </tr>
                     </table>
                   </td>
                 </tr>
                </table>
             </td>
          </tr>
     </table>
</asp:Content>

